package shyvana;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class HandTest {
		
	private int magicTestOfDoom(long a, long b){
		Hand h1 = new Hand(a);
		Hand h2 = new Hand(b);
		System.out.printf("%016x %016x\n", h1.getScore(),h2.getScore());
		return h1.compareWith(h2);
	}
	
	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetScore0() {
		assertEquals(magicTestOfDoom(0x00100C1B2AL,0x0C1C000102L),1);
	}
	@Test
	public void testGetScore1() {
		assertEquals(magicTestOfDoom(0x0001020304L,0x0506070809L),1);
	}
	@Test
	public void testGetScore2() {
		assertEquals(magicTestOfDoom(0x0011223304L,0x1021320314L),0);
	}
	@Test
	public void testGetScore3() {
		assertEquals(magicTestOfDoom(0x0011223304L,0x0212220313L),1);
	}
	@Test
	public void testGetScore4() {
		assertEquals(magicTestOfDoom(0x0010203132L,0x0111210C0BL),1);
	}
	@Test
	public void testGetScore5() {
		assertEquals(magicTestOfDoom(0x0011223304L,0x0516273809L),1);
	}
	@Test
	public void testGetScore6() {
		assertEquals(magicTestOfDoom(0x0B25121938L,0x0A25121938L),-1);
	}
	@Test
	public void testGetScore7() {
		assertEquals(magicTestOfDoom(0x0010200111L,0x0010300212L),1);
	}
	@Test
	public void testGetScore8() {
		assertEquals(magicTestOfDoom(0x0112233405L,0x0102030409L),1);
	}
	@Test
	public void testGetScore9() {
		assertEquals(magicTestOfDoom(0x0111091524L,0x1121390534L),0);
	}
	@Test
	public void testGetScore10() {
		assertEquals(magicTestOfDoom(0x0111091524L,0x1121390533L),-1);
	}
	@Test
	public void testGetScore11() {
		assertEquals(magicTestOfDoom(0x0112233405L,0x0919290A1BL),-1);
	}
	@Test
	public void testGetScore12() {
		assertEquals(magicTestOfDoom(0x0111213100L,0x0B1B2B0A09L),-1);
	}
	@Test
	public void testGetScore13() {
		assertEquals(magicTestOfDoom(0x0C1C0B0A19L,0x0010011102L),1);
	}
	@Test
	public void testGetScore14() {
		assertEquals(magicTestOfDoom(0x0C1C001002L,0x2C3C09190BL),1);
	}
	@Test
	public void testGetScore15() {
		assertEquals(magicTestOfDoom(0x0C1C001002L,0x2C3C091929L),1);
	}

}
